<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>圣杯布局</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    header, footer{
      height: 50px;
      width: 100%;
      border: 1px solid;
      background: grey;
    }

    .content {
      padding: 0 300px;
      overflow: hidden;
    }

    .content .middle {
      float: left;
      width: 100%;
      background: #df0;
    }

    .content .left,
    .content .right {
      float: left;
      width: 300px;
      height: 200px;
    }

    .content .left {
      position: relative;
      margin-left: -100%;
      left: -300px;
      background: #bfc;
    }

    .content .right {
      position: relative;
      margin-left: -300px;
      left: 300px;
      background: #bbf;
    }

    .left, .middle, .right {
      padding-bottom: 10000px;
      margin-bottom: -10000px;
    }
  </style>
</head>
<body>
  <div class="wrapper">
    <header></header>
    <div class="content">
      <div class="middle">
        <h1>这是中间的内容～</h1>
      </div>
      <div class="left"></div>
      <div class="right"></div>
    </div>
    <footer></footer>
  </div>
</body>
</html>
